const http = require('http')
const server = http.createServer((req, res) => {
    res.writeHead(200,{
        'Access-Control-Allow-Origin':'http://192.168.1.87',
        'Access-Control-Allow-Methods':'GET,POST',
        'Access-Control-Allow-Headers':'Content-Type'
    })
    http.request({
        host:'192.168.1.75',
        port:3000,
        path:'/',
        method:'GET',
        headers:{}
    },(proxyRes)=>{
        proxyRes.on('data',(data)=>{
            console.log(data.toString());
            res.end(data.toString())

        })
    }).end()
})
server.listen(3000, () => {
    console.log('server is running at http://localhost:3000')
})
